<template>
  <div class="container">
    <!-- 微信服务 -->
    <!-- 查询条件 -->
        <el-form :inline="true" class="tableSearchBox" size="medium">
          <el-form-item label="用户编号：">
            <el-input v-model="search.name" placeholder="请输入用户编号" clearable></el-input>
          </el-form-item>
         <el-form-item label="时间：">
            <el-date-picker v-model="search.time" type="daterange" value-format="yyyy-MM-dd" range-separator="至"
              start-placeholder="开始日期" end-placeholder="结束日期">
            </el-date-picker>
          </el-form-item>

          <el-form-item>
            <el-button type="primary" icon="el-icon-search" >查询</el-button>
          </el-form-item>
        </el-form>
        <!-- /查询条件 -->
        <PagesTable :tableHeader="tableHeader" :tableData="tableData" :tableOperation="tableOperation"
          :tablePagination="tablePagination" @pageSize="pageSizeChange" @currentPage="currentPageChange"
          @pageOperation="handlePageOperation" />
  </div>
</template>

<script>
  import PagesTable from "../../components/PagesTable.vue";
  export default {
    components: {
      PagesTable
    },
    data() {
      return {
        search: {
          name: "",
          time: ["", ""], //开始和结束时间
        },
        tableHeader: [
          {
            name: "序号",
            mark: "no",
            minWidth: "90"
          },
          {
            name: "用户编号",
            mark: "id",
            minWidth: "90"
          },{
            name: "用户姓名",
            mark: "name",
            minWidth: "90"
          }, {
            name: "关联微信号",
            mark: "wxid",
            minWidth: "90"
          },
          {
            name: "绑定时间",
            mark: "time",
            minWidth: "90"
          },
        ],
        tableOperation: [{
            name: "编辑",
            mark: "edit",
            icon: true
          },
          {
            name: "删除",
            mark: "delete",
            icon: true
          },
        ],
        tablePagination: {
          show: true,
          current: 1,
          size: 10,
          total: 1
        },
        tableData: [],
      }
    },
    mounted() {
      //假数据-------
      let list=["张美丽","李富华","丁菊香","赵国富","赵丽平","陆光"]
      for (let index = 0; index < list.length; index++) {
        const name = list[index];
        let item={no:index+1,id:13451+index,name:name,wxid:+index+5+"jsh7ui142_244sa"+index,time:"2022-05-1"+index}
        this.tableData.push(item);
      }
      this.tablePagination.total=this.tableData.length
    },
    beforeDestroy() {
    },
    created() {
    },
    methods: {
      
    }
  }

</script>
<style lang="scss" scoped>

</style>